EMT Practice Test

1. Question Content...


Question List

Question1: What does the totalKeysExamined field returned by the explain method indicate?

Question2: Which mongodb tool is used to report details on number of database operations in MongoDB?

Question3: Which of the following is supported by MongoDB?

Question4: What is the maximum size of a MongoDB document

Question5: In a collection that contains 100 post documents, what does the following command do? db. posts. find().skip(5).limit(5)

Question6: Which of the following collections stores authentication credentials in MongoDB?

Question7: Aggregation Pipelines have a limit of:

Question8: What tool would you use if you want to save a gif file in mongo?

Question9: What does the following $slice query return using the following command? db.posts.find( {}, { comments: { $slice: [ -10, 5 ] } } )

Question10: Which of the following are common uses of the mongo shell? Check all that apply

Question11: Which of the following operators is used to updated a document partially?

Question12: In what format does mongodump creates backup files?

Question13: Which of the following is a valid Replica Set configuration if you want:
1-Have 3 copies of everything
2- That RS3 is never primary
2- That RSI and RS2 can be primary?
You had to see the different configurations, RS3 could be hidden or priority 0 (But not a referee because we need
3 replicas), while RSI and RS2 could NOT have priority 0 or be hidden or anything like that In a 4-member RS RSO , RSI, RS2 and RS3 + Referee, RSO (primary) falls after some write operations that have replicated RSI and RS2 (but NOT RS3), who can get up as the new primary?
The configuration comes and in it we see that RS2 has a hidden: true (or a priority: 0, (I don't remember)

Question14: Which of the following does MongoDB use to provide High Availability and fault tolerance?

Question15: Dada una coleccion, cuales devuelve con la siguiente query db.coleccion.find({nombre:"ruben",apellido:"gomez"},{nombre:l,apellido:l,aficion:l});

Question16: Which of the following is true of the mechanics of replication in MongoDB? Check all that apply.

Question17: Below is a sample document of "orders" collection

Question18: Which of the following are valid json documents? Select all that apply.

Question19: What is the output of the following program?

Question20: What does the following query do when performed on the posts collection? db.posts.update({_id:l},{Title:This is post with ID 1"})

Question21: Consider the following posts document:

Which of the following queries will return the documents but with only the first two tags in the tags array?

Question22: What is the on-premise solution having functionality equivalent to cloud manager?

Question23: Which is the default mode in which the explain() command runs?

Question24: Which of the following aggregation commands in MongoDB does not support sharded collections?

Question25: MongoDB is a schema-less design.

Question26: You have the following index on the toys collection:
{
"manufacturer" : 1,
"name" : 1,
"date" : -1
}
Which of the following is able to use the index for the query? Check all that apply.

Question27: Which of the following is a valid insert statement in mongodb? Select all valid.

Question28: What is the output of following two commands in MongoDB: db. posts. insert({n_id":l}) db.posts.insert({"_id":l})

Question29: Consider the following documents:

You perform the following query;

How many documents will be updated by the query?

Question30: What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden. The set also has an arbiter?

Question31: You are comparing values of different BSON types in mongodb. You want to compare from lowest to highest. Which comparison order is used?

Question32: Which of the following is incorrect statement about find and findOne operations in MongoDB?

Question33: Which is the correct order (lowest to highest) in which MongoDB compares the BSON types?

Question34: You are in a sharded cluster. What will you do prior to initiating backup in sharded cluster?

Question35: Which of the tags in a replica set configuration specify the operations to be read from the node with the least network latency?

Question36: 'mongoimport' command is used for

Question37: Write the command(s) are correct to enable sharding on a database "testdb" and shard a collection "testCollection" with _id as shard key.

Question38: Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?

Question39: In which of the following scenarios is sharding not the correct option. Select all that apply.

Question40: To add a new user and enable authentication in MongoDB, which of the following steps need be executed?

Question41: If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?

Question42: In a sharded replicas set environment with multiple mongos servers, which of the following would decide the mongos failover?

Question43: In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?

Question44: Below is a sample document of "orders" collection

Question45: What is the use of mongodump and mongorestore tools?

Question46: Which of the following commands will return all the posts with number of likes greater than 100 and less than 200, both inclusive?

Question47: Which operations add new documents to a collection?

Question48: Consider that the posts collection contains an array called ratings which contains ratings given to the post by various users in the following format:

Which of the following query will return all the documents where the ratings array contains elements that in some combination satisfy the query conditions?

Question49: What tool do you use if you want to extract a CSV from mongo?

Question50: What is the first task that a secondary would perform on being prompted by another secondary for an election?

Question51: The________operator can be used to identify an element in the array to be updated without explicitly specifying the position of the element.

Question52: Which option can be used with update command so that a new document gets created if no matching document is found based on the query condition?

Question53: Which of the following aggregate commands in MongoDB uses a pipeline approach with the goals of improving the aggregation performance?

Question54: Which of the following about Capped Collections is correct?

Question55: You perform the following query on the sayings collection, which has the index
{ quote : "text" }:
Assuming the documents below are in the collection, which ones will the following query return? Check all that apply.
db.sayings.find( { $text : { $search : "fact find" } } )

Question56: MongoDB is

Question57: The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. All the replica set members contain a copy of the oplog in the following collection:

Question58: Which of the following operator can be used to control the number of items of an array that a query returns?

Question59: Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?

Question60: Which of the following command inside aggregate command is used in MongoDB aggregation to filter the documents to pass only the documents that match the specified condition(s) to the next pipeline stage.